package com.isorf.controller;

import com.isorf.test.Dog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "测试接口")
@RestController
public class TestController {

    @ApiOperation("测试接口")
    @PostMapping("/test")
    public String test() {

        Dog dog = new Dog();
        dog.setAge(10);
        dog.setName("小黄");
        dog.setSex("公");
        //三角形的周
        double zhouchang = dog.triangle(3, 4, 5);
        return "name:" + dog.getName() + " age:" + dog.getAge() + " sex:" + dog.getSex() + " 周长:" + zhouchang;

    }


}
